<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto;}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<div style="text-align: center">
    <a th:href="@{/user/toLogin}">退出登录</a>
    <span style="color: darkslategray; font-size: 30px">欢迎使用！</span>
    <hr/>

    <table class="list">
        <tr>
            <form th:action="@{/etc/findList}" method="post">
                <th>车牌号</th>
                <th><input type="text" name="carId" th:value="${etc.carId}"></th>
                <th>ETC卡号</th>
                <th><input type="text" name="etcId" th:value="${etc.etcId}"></th>
                <th><input type="submit" value="查询"></th>
            </form>
        </tr>
        <tr>
            <td>Id</td>
            <td>车牌号</td>
            <td>ETC卡号</td>
            <td>余额</td>
            <td>用户名</td>
            <td>使用年限</td>
        </tr>
        <tr th:each="etc : ${etcList}">
            <td th:text="${etc.id}"></td>
            <td th:text="${etc.carId}"></td>
            <td th:text="${etc.etcId}"></td>
            <td th:text="${etc.money}"></td>
            <td th:text="${etc.userName}"></td>
            <td th:text="${etc.lateYear}"></td>
        </tr>
    </table>
</div>
</body>
</html>